package com.credit2go.cloud.controller;

import java.util.List;

import com.credit2go.cloud.model.TUser;
import com.credit2go.cloud.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {


    @Autowired
    private DiscoveryClient discoveryClient;

    @Autowired
    private UserService userService;


    @GetMapping("/simple/{id}")
    public List<TUser> findById(@PathVariable Long id) {
        return userService.getList();
    }


}
